home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / DJGPP / BCCGRX12.ZIP / contrib / bcc2grx / src / bgiext01.c < prev    next >
C/C++ Source or Header  |  1993-04-07  |  4KB  |  92 lines

  1. /*
  2.  *  BCC2GRX  -  Interfacing Borland based graphics programs to LIBGRX
  3.  *  Copyright (C) 1993  Hartmut Schirmer
  4.  *
  5.  *  see bccgrx.c for details
  6.  */
  7.  
  8. #ifdef __TURBOC__
  9. #  include <graphics.h>
  10. #endif
  11. #ifdef __GNUC__
  12. #  include "../include/libbcc.h"
  13. #endif
  14.  
  15. #include "../include/bgiext.h"
  16.  
  17. unsigned char _dac_normal[256][3] = {
  18.     { 0, 0, 0},     { 0, 0,42},     { 0,42, 0},     { 0,42,42},
  19.     {42, 0, 0},     {42, 0,42},     {42,21, 0},     {42,42,42},
  20.     {21,21,21},     {21,21,63},     {21,63,21},     {21,63,63},
  21.     {63,21,21},     {63,21,63},     {63,63,21},     {63,63,63},
  22.     { 0, 0, 0},     { 5, 5, 5},     { 8, 8, 8},     {11,11,11},
  23.     {14,14,14},     {17,17,17},     {20,20,20},     {24,24,24},
  24.     {28,28,28},     {32,32,32},     {36,36,36},     {40,40,40},
  25.     {45,45,45},     {50,50,50},     {56,56,56},     {63,63,63},
  26.     { 0, 0,63},     {16, 0,63},     {31, 0,63},     {47, 0,63},
  27.     {63, 0,63},     {63, 0,47},     {63, 0,31},     {63, 0,16},
  28.     {63, 0, 0},     {63,16, 0},     {63,31, 0},     {63,47, 0},
  29.     {63,63, 0},     {47,63, 0},     {31,63, 0},     {16,63, 0},
  30.     { 0,63, 0},     { 0,63,16},     { 0,63,31},     { 0,63,47},
  31.     { 0,63,63},     { 0,47,63},     { 0,31,63},     { 0,16,63},
  32.     {31,31,63},     {39,31,63},     {47,31,63},     {55,31,63},
  33.     {63,31,63},     {63,31,55},     {63,31,47},     {63,31,39},
  34.     {63,31,31},     {63,39,31},     {63,47,31},     {63,55,31},
  35.     {63,63,31},     {55,63,31},     {47,63,31},     {39,63,31},
  36.     {31,63,31},     {31,63,39},     {31,63,47},     {31,63,55},
  37.     {31,63,63},     {31,55,63},     {31,47,63},     {31,39,63},
  38.     {45,45,63},     {49,45,63},     {54,45,63},     {58,45,63},
  39.     {63,45,63},     {63,45,58},     {63,45,54},     {63,45,49},
  40.     {63,45,45},     {63,49,45},     {63,54,45},     {63,58,45},
  41.     {63,63,45},     {58,63,45},     {54,63,45},     {49,63,45},
  42.     {45,63,45},     {45,63,49},     {45,63,54},     {45,63,58},
  43.     {45,63,63},     {45,58,63},     {45,54,63},     {45,49,63},
  44.     { 0, 0,28},     { 7, 0,28},     {14, 0,28},     {21, 0,28},
  45.     {28, 0,28},     {28, 0,21},     {28, 0,14},     {28, 0, 7},
  46.     {28, 0, 0},     {28, 7, 0},     {28,14, 0},     {28,21, 0},
  47.     {28,28, 0},     {21,28, 0},     {14,28, 0},     { 7,28, 0},
  48.     { 0,28, 0},     { 0,28, 7},     { 0,28,14},     { 0,28,21},
  49.     { 0,28,28},     { 0,21,28},     { 0,14,28},     { 0, 7,28},
  50.     {14,14,28},     {17,14,28},     {21,14,28},     {24,14,28},
  51.     {28,14,28},     {28,14,24},     {28,14,21},     {28,14,17},
  52.     {28,14,14},     {28,17,14},     {28,21,14},     {28,24,14},
  53.     {28,28,14},     {24,28,14},     {21,28,14},     {17,28,14},
  54.     {14,28,14},     {14,28,17},     {14,28,21},     {14,28,24},
  55.     {14,28,28},     {14,24,28},     {14,21,28},     {14,17,28},
  56.     {20,20,28},     {22,20,28},     {24,20,28},     {26,20,28},
  57.     {28,20,28},     {28,20,26},     {28,20,24},     {28,20,22},
  58.     {28,20,20},     {28,22,20},     {28,24,20},     {28,26,20},
  59.     {28,28,20},     {26,28,20},     {24,28,20},     {22,28,20},
  60.     {20,28,20},     {20,28,22},     {20,28,24},     {20,28,26},
  61.     {20,28,28},     {20,26,28},     {20,24,28},     {20,22,28},
  62.     { 0, 0,16},     { 4, 0,16},     { 8, 0,16},     {12, 0,16},
  63.     {16, 0,16},     {16, 0,12},     {16, 0, 8},     {16, 0, 4},
  64.     {16, 0, 0},     {16, 4, 0},     {16, 8, 0},     {16,12, 0},
  65.     {16,16, 0},     {12,16, 0},     { 8,16, 0},     { 4,16, 0},
  66.     { 0,16, 0},     { 0,16, 4},     { 0,16, 8},     { 0,16,12},
  67.     { 0,16,16},     { 0,12,16},     { 0, 8,16},     { 0, 4,16},
  68.     { 8, 8,16},     {10, 8,16},     {12, 8,16},     {14, 8,16},
  69.     {16, 8,16},     {16, 8,14},     {16, 8,12},     {16, 8,10},
  70.     {16, 8, 8},     {16,10, 8},     {16,12, 8},     {16,14, 8},
  71.     {16,16, 8},     {14,16, 8},     {12,16, 8},     {10,16, 8},
  72.     { 8,16, 8},     { 8,16,10},     { 8,16,12},     { 8,16,14},
  73.     { 8,16,16},     { 8,14,16},     { 8,12,16},     { 8,10,16},
  74.     {11,11,16},     {12,11,16},     {13,11,16},     {15,11,16},
  75.     {16,11,16},     {16,11,15},     {16,11,13},     {16,11,12},
  76.     {16,11,11},     {16,12,11},     {16,13,11},     {16,15,11},
  77.     {16,16,11},     {15,16,11},     {13,16,11},     {12,16,11},
  78.     {11,16,11},     {11,16,12},     {11,16,13},     {11,16,15},
  79.     {11,16,16},     {11,15,16},     {11,13,16},     {11,12,16},
  80.     {63,63,63},     {63,63,63},     {63,63,63},     {63,63,63},
  81.     {63,63,63},     {63,63,63},     {63,63,63},     {63,63,63}
  82. };
  83.  
  84. void setrgbdefaults(void)
  85. {
  86.   int i;
  87.  
  88.   for (i = 0; i < 256; ++i)
  89.     setrgbpalette(i,_dac_normal[i][0],_dac_normal[i][1],_dac_normal[i][2]);
  90. }
  91.  
  92.